package com.jdiv;

import java.awt.Graphics;
import java.awt.Graphics2D;


public class JUpdate extends Thread implements JConst{
	public JUpdate(){}
	
	public void run(){
		while(true){
			
			JDiv.update();	
		//	JDiv.delay(DELAY);
		}

		
/*		
	if 	(JDiv.strategy!=null){
		  // Render single frame
	    do {
	        // The following loop ensures that the contents of the drawing buffer
	        // are consistent in case the underlying surface was recreated
	        do {
	            // Get a new graphics context every time through the loop
	            // to make sure the strategy is validated
	            Graphics2D graphics =(Graphics2D)JDiv.strategy.getDrawGraphics();
	            
	            // Render to graphics
	            JDiv.update(graphics);
	            // Dispose the graphics
	            graphics.dispose();

	            // Repeat the rendering if the drawing buffer contents 
	            // were restored
	        } while (JDiv.strategy.contentsRestored());

	        // Display the buffer
	        JDiv.strategy.show();

	        // Repeat the rendering if the drawing buffer was lost
	    } while (JDiv.strategy.contentsLost());
	} 
*/
	}
	

}
